<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ .title }}</title>
    <link rel="shortcut icon" href="/img/tether.svg"/>
    <link rel="stylesheet" href="/css/usdt.min.css">
    <script src="/js/jquery.min.js"></script>
    <script src="/js/jquery.qrcode_1.0.min.js"></script>
    <script src="/js/usdt.min.js"></script>
</head>

<body>
<div class="payment-container">
    <div class="crypto-icon">USDT</div>
    <h1 class="payment-title">USDT 支付</h1>
    <p class="payment-subtitle">
        <span class="status-indicator"></span>
        请使用 波场<strong>(TRON)</strong> 进行转账
        <span class="network-badge">TRC20</span>
    </p>
    <div class="order-info">
        <div class="order-item">
            <span class="order-label">转账金额:</span>
            <span class="order-value amount-highlight" id="payAmount">{{.amount}} USDT</span>
        </div>
        <div class="order-item">
            <span class="order-label">商户订单:</span>
            <span class="order-value" id="orderNumber">{{.order_id}}</span>
        </div>
    </div>
    <div class="countdown-banner">
        <div class="countdown-content">
            <div class="countdown-info">
                <div class="countdown-title">⏰ 支付倒计时</div>
                <div class="countdown-subtitle">请在时间内完成转账</div>
            </div>
            <div class="countdown-timer" id="countdown">
                <div class="time-unit">
                    <span class="time-number" id="minutes">15</span>
                    <span class="time-label">分</span>
                </div>
                <span class="time-separator">:</span>
                <div class="time-unit">
                    <span class="time-number" id="seconds">00</span>
                    <span class="time-label">秒</span>
                </div>
            </div>
        </div>
    </div>
    <div class="qr-section">
        <div class="qr-code" id="qrcode"></div>
        <div class="address-section">
            <div class="address-label">收款地址 (TRC20 网络)</div>
            <div class="address-text" id="walletAddress">{{.address}}</div>
            <button class="copy-btn" onclick="copyAddress()">复制地址</button>
        </div>
    </div>
    <div class="instructions">
        <h4>📋 转账说明</h4>
        <ol>
            <li>必须使用 <strong>TRC20 网络</strong> 进行转账</li>
            <li>转账完成后系统会自动确认到账</li>
            <li>转账金额必须与显示金额完全一致</li>
            <li>如果有其它疑问 请联系客服处理</li>
        </ol>
    </div>
    <div class="footer-info">
        <div class="project-info">
            <span class="powered-by">Powered by</span>
            <a href="https://yc.linlang.space" target="_blank" class="project-link">
                <strong>狗尚</strong>
            </a>
            <span class="open-source">狗尚</span>
        </div>
    </div>
</div>

<script>
    document.addEventListener('DOMContentLoaded', function () {
        USDTPayment.init({
            expire: "{{.expire}}",
            address: "{{.address}}",
            trade_id: "{{.trade_id}}",
            return_url: "{{.return_url}}"
        });
    });
</script>
</body>

</html>